//
//  BrowseView.h
//  MobileZIPCodes
//
//  Created by Andreas Schwelling on 23.11.07.
//	http://www.andi.de/zipcodes/
// 
//  Released under the GNU General Public License.
//  See LICENSE for details.
//
//  Use at your own risk.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UITransitionView.h>
#import <UIKit/UIPreferencesTable.h>
#import <UIKit/UISectionList.h>
#import <UIKit/UISegmentedControl.h>
#import <UIKit/UISwitchControl.h>
#import <UIKit/UIPreferencesTextTableCell.h>
#import <UIKit/UIButtonBar.h>
#import <UIKit/UIProgressIndicator.h>
#import <WebCore/WebFontCache.h>

#import "SQLiteDB.h"
#import "DataManager.h"
#import "ResultView.h"



@interface ZipDetailView : UIView {
	CGRect				_rect;
	UISectionList		*_sectionList;
	UITable				*_table;
	id					_delegate;
	NSMutableArray*			_tableCells;
	NSMutableArray*			_tableHeaders;
	NSString			*_zipprefix;
	UIView				*_prevView;
}

- (id)initWithFrame:(struct CGRect)rect;
-(void)dealloc;
-(void)setDelegate:(id)del;
-(void)setZipPrefix:(NSString*)prefix;
-(void)setPrevView:(UIView*)pv;
-(UIView*)getPrevView;

@end



@interface ZipOverView : UIView {
	CGRect				_rect;
	UISectionList		*_sectionList;
	UITable				*_progresstable,*_table;
	id					_delegate;
	NSMutableArray*			_tableCells;
	NSMutableArray*			_tableHeaders;
	UIProgressIndicator	*_uip;	
	UIView				*_prevView;
}

-(void)fillTable:(id)p;
- (id)initWithFrame:(struct CGRect)rect;
-(void)dealloc;
-(void)setDelegate:(id)del;
-(void)setPrevView:(UIView*)pv;
-(UIView*)getPrevView;

@end




@interface NameCityView : UIView {
	CGRect				_rect;
	UISectionList		*_sectionList;
	UITable				*_progresstable,*_table;
	id					_delegate;
	NSMutableArray*			_tableCells;
	NSMutableArray*			_tableHeaders;
	UIProgressIndicator	*_uip;	
	UIView				*_prevView;
	//SearchNameResultView *_searchNameResultView;
}

- (void) fillTable:(id)p;
- (id)initWithFrame:(struct CGRect)rect;
-(void)dealloc;
-(void)setDelegate:(id)del;
-(void)setPrevView:(UIView*)pv;
-(UIView*)getPrevView;

@end




@interface NameStateView : UIView {
	CGRect				_rect;
	UISectionList		*_sectionList;
	UITable				*_table;
	id					_delegate;
	NSMutableArray*			_tableCells;
	NSMutableArray*			_tableHeaders;
	
	UIView				*_prevView;
}

- (id)initWithFrame:(struct CGRect)rect;
-(void)dealloc;
-(void)setDelegate:(id)del;
-(void)setPrevView:(UIView*)pv;
-(UIView*)getPrevView;

@end



@interface NameZipView : UIView {
	CGRect				_rect;
	UISectionList		*_sectionList;
	UITable				*_table;
	id					_delegate;
	NSMutableArray*			_tableCells;
	NSMutableArray*			_tableHeaders;
	
	UIView				*_prevView;
}

- (id)initWithFrame:(struct CGRect)rect;
-(void)dealloc;
-(void)setDelegate:(id)del;
-(void)setPrevView:(UIView*)pv;
-(UIView*)getPrevView;

@end



@interface BrowseView : UIView {
	CGRect				_rect;
	UITransitionView	*_transitionView;
	UISectionList		*_sectionList;
	UITable				*_table;
	id					_delegate;
	NSMutableArray*			_tableCells;
	NSMutableArray*			_tableHeaders;
	UINavigationBar		*_navBar;
	
	int					currentView;
	UIView				*namezipview,*_actualView;
	
	BrowseDataObject			*_bdo;
	
}

#define COUNTRY_VIEW 0x00
#define NAME_ZIP_VIEW 0x01
#define ALPHABET_VIEW 0x02
#define PREZIP_VIEW 0x03


- (id)initWithFrame:(struct CGRect)rect;
-(void)dealloc;
-(BrowseDataObject*)getBdo;
-(UINavigationBar*)getNavBar;
-(void)setDelegate:(id)del;
-(UITransitionView*)getTransitionView;
-(UIView*)getCurrentView;
-(void)setCurrentView:(UIView*)view;

@end
